import React,{useEffect} from 'react'
import {RouteComponentProps} from "react-router-dom";
import MyTabBar from "../../../components/TabBar/TabBar";
import MyNavBar from "../../../components/NavBar/NavBar";
import UserOrGroup from "./UserOrGroup/UserOrGroup";
import AddContacts from "./AddContacts/AddContacts";

const Contacts = (props: RouteComponentProps) => {
    useEffect(() => {
        const uUid = sessionStorage.getItem('uUid')
        if(!uUid) props.history.push('/goIn')
    },[props])
    return (
        <div style={{marginTop: '45px',marginBottom: '50px'}}>
            <MyNavBar content='联系人' rightContent={(<AddContacts/>)}/>
            <UserOrGroup />
            <MyTabBar />
        </div>
    )
}

export default Contacts